﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Chat_Common
{
    /// <summary>
    /// 转换帮助
    /// </summary>
    public static class ConvertHelper
    {
        /// <summary>
        /// 转int
        /// </summary>
        public static int ObjToInt(this object obj)
        {
            if (obj is int)
                return Convert.ToInt32(obj);
            else
                return 0;
        }
    }
}
